LXMF fields
Part 2/2 • 4.8 KB total
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Image attachment
| Constant | Index | Description | Content |
|---|---|---|---|
| FIELD_IMAGE | 0x06 | Image container | See example |
# Include an image
image = ["webp", image_data]
lxm_fields = { LXMF.FIELD_IMAGE: image }
lxm = LXMF.LXMessage(dest, source, message_content, desired_method=LXMF.LXMessage.DIRECT, fields=lxm_fields)
Audio attachment
| Constant | Index | Description | Content |
|---|---|---|---|
| FIELD_AUDIO | 0x07 | Audio container for non-realtime purposes | See example |
See https://github.com/markqvist/LXMF/blob/master/LXMF/LXMF.py for available audio modes.
# Audio fields are a list with two entries of:
# - The audio mode in use, from one of the available modes
# - The audio data encoded according to the specified mode
audio = [LXMF.AM_CODEC2_2400, audio_data]
lxm_fields = { LXMF.FIELD_AUDIO: audio }
lxm = LXMF.LXMessage(dest, source, message_content, desired_method=LXMF.LXMessage.DIRECT, fields=lxm_fields)
Thread
Not yet fully implemented, and spec is likely to change.
| Constant | Index | Description | Content |
|---|---|---|---|
| FIELD_THREAD | 0x08 | | |
Commands
See the Sideband application source code for command/result format info.
| Constant | Index | Description | Content |
|---|---|---|---|
| FIELD_COMMANDS | 0x09 | Direct commands | |
Custom commands are sent in this field. Built in commands include: Ping Echo Signal
Results
See the Sideband application source code for command/result format info.
| Constant | Index | Description | Content |
|---|---|---|---|
| FIELD_RESULTS | 0x0A | | |
Group
Not yet fully implemented, and spec is likely to change.
| Constant | Index | Description | Content |
|---|---|---|---|
| FIELD_GROUP | 0x0B | | |
See also
• LXMF
• Structure in the repository's README
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────